home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Commodities / GrabIFF / GrabIFF.Doc < prev    next >
Text File  |  1996-09-26  |  22KB  |  451 lines

  1.  
  2.  
  3.  
  4.          GGGGGG    RRRRRR    AAAAAA   BBBBBBB   II  FFFFFFFF  FFFFFFFF
  5.         GG    GG  RR    RR  AA    AA  BB    BB  II  FF        FF      
  6.         GG        RR    RR  AA    AA  BB    BB  II  FF        FF      
  7.         GG        RR    RR  AA    AA  BB    BB  II  FF        FF      
  8.         GG        RRRRRRR   AAAAAAAA  BBBBBBB   II  FFFFFF    FFFFFF  
  9.         GG  GGG   RR RR     AA    AA  BB    BB  II  FF        FF      
  10.         GG    GG  RR  RR    AA    AA  BB    BB  II  FF        FF      
  11.         GG    GG  RR   RR   AA    AA  BB    BB  II  FF        FF      
  12.          GGGGGG   RR    RR  AA    AA  BBBBBBB   II  FF        FF      
  13.  
  14.  
  15.  
  16.                                 © June 1992 by
  17.                           Bernstein Zirkel Softworks
  18.                               c/o Hartmut Stein
  19.                                 Koelner Str. 7
  20.                         W-5090 Leverkusen 3 - Opladen
  21.                                  West-Germany
  22.  
  23.  
  24.  
  25.  
  26.      1. A short introduction
  27.      -----------------------
  28.  
  29.         GrabIFF  is  a  program  which allows you to grab IFF-pictures or
  30.      -brushes  from  any  screen,  window  or  mousepointer provided that
  31.      multitasking  is not turned off.  These IFF-files can then be loaded
  32.      and edited by almost any paint program.
  33.  
  34.         You  can  either save the contents of a specific screen or window
  35.      or  just  a  portion  of a screen.  As an additional feature GrabIFF
  36.      gives  you  the  possibility  to  save mousepointers as IFF-brushes.
  37.      GrabIFF will only work on Amigas with at least OS 2.04 installed.
  38.  
  39.  
  40.      2. What it does
  41.      ---------------
  42.  
  43.         When  GrabIFF  is  installed  you  can  activate it by a specific
  44.      combination  of  qualifier  keys (these are control, caps lock, alt,
  45.      shift  and  amiga).   By  default  you  just  press  the control key
  46.      together with the left amiga key - an easy to reach combination.  If
  47.      you  don't  like  this (or it collides with the hotkey of some other
  48.      program you use) you can choose any combination you like.
  49.  
  50.         When  GrabIFF  detects  this  specified  qualifier combination it
  51.      draws  a  crosshair  on  the  active  screen.   Now  there  are five
  52.      different ways to continue:
  53.  
  54.      a) Grab the whole screen
  55.         To  grab the whole screen just hit the 's' (s = screen) key while
  56.         still holding the qualifiers down.
  57.  
  58.      b) Grab the active window
  59.         To grab the active window just hit the 'w' (w = window) key while
  60.         still holding the qualifiers down.
  61.  
  62.      c) Grab the actual mouse pointer
  63.         To  grab  the actual mouse pointer just hit the 'p' (p = pointer)
  64.         key while still holding the qualifiers down.
  65.  
  66.      d) Grab any portion of the screen
  67.         To  grab  a rectangular portion of the screen you should move the
  68.         mouse  to  any  one  of the four corners of the desired rectangle
  69.         while  still  holding  the  qualifier down.  Press the left mouse
  70.         button  and  hold  it  down.  The crosshair becomes a rubberband.
  71.         Now  drag the mouse (still hold the qualifiers and the left mouse
  72.         button  down)  to  the opposite edge of the rectangle and release
  73.         the mouse button.
  74.  
  75.      e) Cancel the operation
  76.         To  cancel  the  operation  at  any point just release any of the
  77.         qualifier keys.
  78.  
  79.         As  default  GrabIFF  saves the grabbed pictures to the RAM:-disk
  80.      with the names 'GrabIFF.001', 'GrabIFF.002' etc.
  81.  
  82.         Grabbing  windows  is  a  bit  complicated  if  these windows are
  83.      overlapped  by  some  other windows.  If the window at the back is a
  84.      super  bitmap  or smart refresh window, the hidden regions are saved
  85.      by  the layers.library and can be accessed without problems.  If the
  86.      window  uses  the  simple  refresh method (like Shell windows or the
  87.      Workbench),  the  hidden  regions will be redrawn by the application
  88.      not  until  the  window  is  revealed.   That's why GrabIFF brings a
  89.      window  to  the  front before grabbing it.  This works well with all
  90.      windows  except  backdrop  windows  -  these  cannot be moved to the
  91.      front.   In this case you should first close all other windows which
  92.      hide the one you want to grab.
  93.  
  94.  
  95.      3. Installation
  96.      ---------------
  97.  
  98.         GrabIFF  consists  of  two  parts:  the program 'GrabIFF' itself,
  99.      which  can  be  placed  anywhere,  and the handler 'GrabIFFHandler',
  100.      which must be placed in the 'L:'-directory.
  101.  
  102.         Workbench-Users  should  click  the  'InstallHandler'-Icon, which
  103.      copies  the  Handler to the desired directory.  Then you should move
  104.      'GrabIFF'  to a suitable directory like 'Tools' or 'Utilities' where
  105.      you  can find it easily when you need it.  If you want GrabIFF to be
  106.      started automatically every time you start or reboot your amiga, you
  107.      should   place   it   into   the   'WBStartup'-directory   of   your
  108.      'WB_2.x'-disk.  To stop the program just start it again.
  109.  
  110.         Shell-Users  can  use  the  InstallHandler-Skript  to copy the
  111.      Handler  to  the  'L:'-directory (or just the 'Copy'-command...).
  112.      Then  copy  'GrabIFF'  to  your 'C:'-directory.  To start GrabIFF
  113.      just type 'GrabIFF' on the command line.  You don't need 'Run' or
  114.      'RunBack',  since  it just installs the handler in the background
  115.      and then returns to the Shell.  To stop the program just start it
  116.      again.
  117.  
  118.  
  119.      4. Options
  120.      ----------
  121.  
  122.         There are lots of options which control the behaviour of GrabIFF.
  123.      In the normal case you don't need any of those, so GrabIFF will work
  124.      completely as stated above.
  125.  
  126.         The  options  are  valid  for  both  Workbench-  and Shell-users.
  127.      Workbench-users  can  enter the options as tooltypes (have a look at
  128.      your   Workbench-manual   for  more  information  about  tooltypes),
  129.      Shell-users  enter  the  options  as usual after the command's name.
  130.      Upper  and lower case are ignored.  When started from the Shell with
  131.      a  '?' as the only argument, you will get a help string in the usual
  132.      format  for  Shell  commands  (look  at  the  Shell  manual for more
  133.      information).
  134.  
  135.      On
  136.         Install GrabIFF.
  137.  
  138.      Off
  139.         Remove  GrabIFF.  If neither 'On' nor 'Off' are given, the actual
  140.         state  of  the  program  is inverted (that means:  if it was off,
  141.         switch it on, otherwise switch it off).
  142.  
  143.      Quiet
  144.         Normally GrabIFF shows you a requester saying 'GrabIFF installed'
  145.         on startup.  This option diables the requester.
  146.  
  147.      Usage
  148.         Show  a  requester  with  short  explanations  for  the different
  149.         options (better have a look at this file!).
  150.  
  151.      AskName
  152.         Normally  GrabIFF  saves the grabbed files under the standardname
  153.         'RAM:GrabIFF'  with  extension  '.000', '.001', '.002' etc.  (see
  154.         'STANDARDNAME' option).  If you specify this flag, every time you
  155.         grab  a  file  the program will ask you for the name to save this
  156.         file under, using a standard ASL requester.
  157.  
  158.      CheckOff
  159.         When  GrabIFF  saves  a  file,  it  normally  checks if this file
  160.         already  exists.   If  it  finds  a  file  with this name and you
  161.         specified  the  'ASKNAME'  option, it will ask you if you want to
  162.         overwrite  the old file.  If not, the operation will be canceled.
  163.         If  you didn't specify 'ASKNAME', GrabIFF will try again with the
  164.         next   extension.   That  means:   if  'RAM:GrabIFF.000'  already
  165.         exists,  it  will  try to save it as 'RAM:GrabIFF.001' and so on.
  166.         Use  the  'CHECKOFF'-option  to  turn  of the existence-check for
  167.         files.
  168.  
  169.      CrosshairOff
  170.         This option will turn the crosshair off, which by default appears
  171.         when  pressing  the  qualifier  combination,  thus  disabling the
  172.         option  of  grabbing  any  rectangle  from a screen.  This can be
  173.         useful  when  you don't want GrabIFF to render anything into your
  174.         screen.  I offer this option because the crosshair leaves a trail
  175.         of  points when grabbing from the DPaint screen (all right, there
  176.         is  no  need  to grab something from the DPaint screen, since you
  177.         can  use  DPaint's  own  grab  facilities, but nevertheless - the
  178.         option).
  179.         The grabbing of complete screens, windows and mousepointers still
  180.         works as explained above.
  181.  
  182.      PackOff
  183.         By  default  GrabIFF  trys  to  pack the ILBM files by use of the
  184.         standard  'cmpByteRun1'  encoding,  which  is understood by every
  185.         program dealing with ILBM files.  If you don't want your files to
  186.         be packed, specify this option.
  187.  
  188.      FrontScreen
  189.         Normally  GrabIFF  works with Intuition's active screen - this is
  190.         the screen on which the currently active window is located.  This
  191.         behaviour  is  ok  for  almost  any  grabbing  purpose.  The only
  192.         problem  arises  when  trying  to  grab  something  from a screen
  193.         without  any  window.  You can't make this screen the active one,
  194.         since  you  can't  activate  a  window on it!  In such a case you
  195.         should use this option.  GrabIFF will now work with the frontmost
  196.         screen  instead of the active one.   Now bring your screen to the
  197.         front and grab it!
  198.  
  199.      Icons
  200.         If  you  want to access a file from the Workbench, the file needs
  201.         an  icon  attached to it (or you should use 'Show all files' from
  202.         the  'Window'-menu).   Specify this option if you want GrabIFF to
  203.         save an icon for every grabbed file.
  204.  
  205.      Verbose
  206.         When  this option is given, GrabIFF will show you a requester for
  207.         evry  saved  file, telling you the name it was saved to, its size
  208.         and its depth.
  209.  
  210.      Error=None|Beep|Window
  211.         If  an error occurs while grabbing (not enough memory, file could
  212.         not  be opened etc.), GrabIFF opens a requester telling you about
  213.         the  nature  of  the  problem.   If  you  specify 'None' for this
  214.         option,  errors  will be ignored.  'Beep' will only force a short
  215.         beep  if any error is detected and 'Window' gives you the default
  216.         setting.
  217.  
  218.      Standardname
  219.         If  you  don't  specify  the  'ASKNAME' option, the files will be
  220.         automatically   stored   with   a   standardname   (defaults   to
  221.         'RAM:GrabIFF')  and a numerical extension.  This option gives you
  222.         the  possibility  to  change  the  standardname  to  any path and
  223.         filename  you  like.   You  should  allways  specify  a  complete
  224.         pathname  including a device specification (like 'RAM:', 'WORK:',
  225.         'DF0:',  'GRAB:');  otherwise  the  files  will  be stored to the
  226.         directory which was the actual one when GrabIFF was started!
  227.  
  228.      Qualifier=nnn
  229.         'nnn'   is   a  decimal  number  which  describes  the  qualifier
  230.         (qualifiers  are:  control, caps lock, shift, alt, amiga) used to
  231.         activate GrabIFF (defaults to the control key in combination with
  232.         the left amiga key).  The qualifiers have the following values:
  233.            Left Shift  1
  234.            Right Shift 2
  235.            Caps Lock   4
  236.            Control     8
  237.            Left Alt    16
  238.            Right Alt   32
  239.            Left Amiga  64
  240.            Right Amiga 128
  241.         If  you  want  a  combination  of  qualifiers  you simply add the
  242.         values.
  243.  
  244.      WindowCode=nnn
  245.         'nnn'  is a decimal number which specifies the rawkey code of the
  246.         button  you  have  to press in combination with the qualifiers to
  247.         make  GrabIFF  save the actual window.  This defaults to 17 which
  248.         is  the  rawkey  code for 'w'.  If you don't know this codes, you
  249.         should use the commodity window (see below) to alter the hotkey.
  250.  
  251.      ScreenCode=nnn
  252.         This  option  works  as the 'WINDOWCODE' option and sets the code
  253.         for grabbing of screens.
  254.  
  255.      PointerCode=nnn
  256.         This  option  works  as the 'WINDOWCODE' option and sets the code
  257.         for grabbing of mouse pointers.
  258.  
  259.      Cx_Priority=nnn
  260.         The  decimal  number  'nnn'  specifies  the priority of GrabIFF's
  261.         inputhandler.
  262.  
  263.      Cx_PopUp=yes|no
  264.         Please  enter either 'yes' or 'no' for this option.  In the first
  265.         case  GrabIFF will automatically open its commodity window, where
  266.         you can adjust all the settings by the use of gadgets.
  267.  
  268.  
  269.      5. Some examples
  270.      ----------------
  271.  
  272.      This  are some examples for how to start GrabIFF from the shell.  To
  273.      use  the  examples  from  the workbench just enter every option as a
  274.      single tool type in GrabIFF's info-window.
  275.  
  276.      GrabIFF On CrosshairOff FrontScreen Standardname=GRAB:NewGrab/XXX
  277.         Start  GrabIFF  (or  give an error message if it's just running).
  278.         The  crosshair  is  disabled  and grabbing will take place in the
  279.         frontmost  (not in the active) screen.  The grabbed pictures will
  280.         be  saved as 'GRAB:NewGrab/XXX.000', 'GRAB:NewGrab/XXX.001', etc.
  281.         provided  that  there  is  a device named 'GRAB' which contains a
  282.         directory name 'NewGrab'.
  283.  
  284.      GrabIFF Off
  285.         Stop GrabIFF (or give an error message if it wasn't running yet).
  286.  
  287.      GrabIFF Qualifier=25 WindowCode=35 ScreenCode=53 PointerCode=21
  288.         Use  the  combination of the control key, left shift and left alt
  289.         to  activate  GrabIFF.   Screens  can  be  saves with the 'b' key
  290.         (Bildschirm),  windows using 'f' (Fenster) and mousepointer using
  291.         'z' (Zeiger).
  292.  
  293.      GrabIFF On CX_PopUp=Yes Icons
  294.         Start  GrabIFF (if it wasn't running yet) and open up the control
  295.         window.   All  new  files  will be accessable by Workbench, since
  296.         GrabIFF now generates Icons.
  297.  
  298.  
  299.      6. Commodities
  300.      --------------
  301.  
  302.         GrabIFF  can  be controlled via the Commodities Exchange tool you
  303.      find  on your Workbench disk.  It may be freely enabled, disabled or
  304.      killed.   When  you  use  the  'Show'-Button  (or the 'Cx_PopUp=yes'
  305.      option  an  startup)  GrabIFF  opens  a special window where you can
  306.      control all the programs features.
  307.  
  308.         In  the  field labeled 'Grab-Codes' you can enter three different
  309.      rawkey  codes.   The  first  one  will  make GrabIFF save the actual
  310.      screen,  the second the actual window and the third the actual mouse
  311.      pointer.   If  you  know  the  rawkey  code  of  the desired key (an
  312.      overview  can  be  found  in  the Amiga Rom Kernel Reference Manual:
  313.      Devices),  you  can  enter  it  in the second row of string gadgets,
  314.      labeled 'Code'.  If you don't know the rawkey code (or if you are to
  315.      lazy  to  search for it) you can enter the desired key itself in the
  316.      first row of the string gadgets (labeled 'Key').  GrabIFF translates
  317.      this  key  into  the  equivalent  rawkey  code  (don't forget to hit
  318.      'Return' or 'Enter').
  319.  
  320.         In  the field named 'Qualifier' you can choose the combination of
  321.      qualifiers which will activate GrabIFF.
  322.  
  323.         The  third  field  gives  you  control over the other features of
  324.      GrabIFF.   The  gadgets will be explained from left to right and top
  325.      to bottom.
  326.  
  327.         The  first  first gadget lets you specify, whether GrabIFF should
  328.      check  for the existence of a file before saving it or whether files
  329.      will be overwritten (see the 'CHECKOFF'-otpion).  In the next gadget
  330.      you can choose between saving files with a standardname or different
  331.      names  GrabIFF  will  prompt you for (see 'ASKNAME'-option).  In the
  332.      following  string-gadget  you can enter the standardname to use (see
  333.      'STANDARDNAME'-option).   In  the second row you can tell GrabIFF to
  334.      compress  the files, to save icons and to be verbose (see discussion
  335.      of  the  options  'PACKOFF', 'ICONS' and 'VERBOSE').  The gadgets of
  336.      the  last  row  let  you  decide  if  you want to use the crosshair,
  337.      whether  GrabIFF  should grab the active or the frontmost screen and
  338.      how  to  handle any error (see options 'CROSSHAIROFF', 'FRONTSCREEN'
  339.      and 'ERROR').
  340.  
  341.         At  the bottom of the window you find three more gadgets:  'Hide'
  342.      closes  the  window,  keeping  GrabIFF still in memory, while 'Quit'
  343.      closes  the  window and removes the program.  The third button 'Save
  344.      to  Icon'  is  only  available  when  the  program  was started from
  345.      Workbench.   In  this  case  you  can  save  the  actual settings as
  346.      tooltypes  to  GrabIFF's  icon,  so  they will by active on the next
  347.      start of the program.  There's no service like this for Shell-users;
  348.      you  have  to  type  it  to  the  command  line by yourself (I think
  349.      Shell-users like typing, so this should be no problem for you...).
  350.  
  351.  
  352.      7. Caveats
  353.      ----------
  354.  
  355.         Though  I  used  this  program  for  a  couple  of  weeks without
  356.      problems,  there  may be any number of lurking bugs in it.  So if it
  357.      low-level-formats  your  harddisk,  makes  your monitor explode into
  358.      lots  of  little  pieces,  gobbles  down  your dog or drinks all the
  359.      liquid  from  your neighbour's aquarium, making his goldfish gasping
  360.      for water - please don't blame it on me!
  361.  
  362.         Following  this  comes some legal stuff which sounds very well to
  363.      me.   I took it from the readme file for Arq, which is a very, very,
  364.      very  good  and  useful  program.   Hi,  Martin,  if  you would have
  365.      mentioned  your adress in this file, I would have sent you something
  366.      for  your  work.   But,  maybe,  you will find GrabIFF a bit useful,
  367.      too...
  368.  
  369.  
  370.      8. Legal Stuff
  371.      --------------
  372.  
  373.         The  author  will  not  be liable for any damage arising from the
  374.      failure  of this program to perform as described, or any destruction
  375.      of other programs or data residing on a system attempting to run the
  376.      program.   While the author knows of no damaging errors, the user of
  377.      this program uses it at his or her own risk.
  378.  
  379.  
  380.      9. Credits
  381.      ----------
  382.  
  383.         Well,  you  may  have noticed that GrabIFF looks a bit (or even a
  384.      bit  more)  like Preben Nielsen's program PicSaver.  I used this one
  385.      for  a  short  time  and then wrote GrabIFF because there were a few
  386.      things  I  didn't  like  about  PicSaver.   The  first thing is this
  387.      annoying  window  always popping up and asking me for a filename.  I
  388.      hated  this!   The  second  thing was its unability to grab graphics
  389.      from  screens  without  windows,  which  I  needed  while developing
  390.      another  program.   The commercial program GrabbIt on the other hand
  391.      was  unable  to grab portions of a screen or just windows, but saved
  392.      its  files  with  a  standard name and a numerical extension and was
  393.      able  to  grab  graphics  from  raw  screens.   So  I decided to put
  394.      together  all  the  good things from these two programs, added a few
  395.      things and lots of options and there it is:  GrabIFF.
  396.  
  397.         Ok,  I have to confess that GrabIFF is a bit bigger than PicSaver
  398.      (the  GrabIFFHandler  takes 14044 bytes, while the complete PicSaver
  399.      only  needs  4560  bytes  on  disk).  But half of this (exactly 7668
  400.      bytes  or  55%)  disk space is wasted by the extensive stuff for the
  401.      commodity  window.   If  don't  need  this  window and want to use a
  402.      smaller  version (6376 bytes of disk space) you can order it from me
  403.      (see below).
  404.  
  405.         I'd  like  to  thank  Preben  Nielsen  for  the  ideas I found in
  406.      PicSaver  (thank  you,  Preben)  and  I'd  like to thank the unknown
  407.      author  of  GrabbIt  (though  I  won't  buy  it,  since I appreciate
  408.      GrabIFF!).
  409.  
  410.  
  411.      10. Other Stuff
  412.      ---------------
  413.  
  414.         This  code  and documentation are freely distributable and may be
  415.      used,  copied,  modified, fed to your cat or whatever you like to do
  416.      with  it.  It would be nice not to remove this text when copying the
  417.      program,  so  other  people  will  also  be  able  to understand its
  418.      meaning.
  419.  
  420.         If  you  have  any questions, have ideas for special improvements
  421.      (is there something else than screens, windows and mousepointers you
  422.      wish  to  grab?),  want to have a look at the sources of the program
  423.      (rather undocumented, I'm afraid), want to order the smaller version
  424.      of GrabIFF or if you just want to thank me for this wonderful little
  425.      tool,  you  should  send  me  some  money  (or  other  valuables), a
  426.      self-adressed  and  stamped  envelope  (if you want response) and an
  427.      empty disk (if you want the sources or the smaller version).
  428.  
  429.         GrabIFF  was  programmed  using the Aztec C 5.2a compiler, but it
  430.      should be compilable with any of the Aztec compilers.
  431.  
  432.  
  433.      11. An Apology
  434.      --------------
  435.  
  436.      I'm  afraid  I  have  to  apologize  for the sometimes extremly poor
  437.      quality  of  this  writing.  When I left school, my English was very
  438.      bad.   Since  then I improved it a little bit by reading, re-reading
  439.      and  re-re-reading  the  english  Rom Kernel Reference Manuals for a
  440.      long  time  and  also placing them under my pillow to absorb them by
  441.      osmosis  (this  joke © by Randell Jesup).  I also tried this with my
  442.      AmigaDOS  manuals,  but that gave me extremly horrible nightmares of
  443.      terrible  red monsters, at least ten foot tall, stalking me from the
  444.      back  while I was sitting at my computer trying to program something
  445.      useful  in  combination  with  the dos, with the four green flashing
  446.      letters  of  'BCPL' on their chests and trying to beat me with their
  447.      enormous  global  vectors.  I woke up crying and all my sheets soken
  448.      wet and I never tried this again...
  449.  
  450.  
  451.